<template>
  <div class="pagination-area">
    <el-pagination
        background
        :page-size="(pageInfo.pageSize) || 10"
        :current-page="(parseInt((pageInfo.pageIndex))) || 1"
        :total="parseInt(pageInfo.total)|| 0"
        layout="total,prev,pager,next,jumper"
        @current-change="handleChange"
    />
  </div>
</template>

<script>
export default {
  name: "Pagination",

  props: ['pageInfo','handleChangePage'],

  data() {
    return {
      value: 10,
    }
  },

  methods: {
    // 点击分页
    handleChange(pageIndex) {
      this.$emit('handleChangePage', pageIndex);
    }
  }
}
</script>

<style lang="scss" scoped>
@import "assets/style.scss";
</style>
